x = int(input())
if x < 0:
    print("Invalid Value!")
elif x <= 50:
    cost = 0.53 * x
    print("cost = %.2f" % cost)
else:
    cost = 0.53 * 50 + (x - 50) * (0.53 + 0.05)
    print("cost = %.2f" % cost)

